package com.fh.shop.api.common;

public enum ResponseEnum {
    ADDRESS_INFO_IS_NULL(8000,"收货信息为空"),
    ADDRESS_DEL_ID_ERROR(8001,"删除收货信息id异常"),
    ADDRESS_FIND_ID_ERROR(8002,"查询收货信息id异常"),

    MEMBER_INACTIVA(7000,"会员未激活"),
    MEMBER_MAIL_IS_ERROR(7001,"邮箱错误"),

    CART_PRODUCT_IS_NULL(6000,"添加购物车的商品不存在"),
    CART_PRODUCT_IS_DOWN(6001,"添加购物车的商品未上架"),
    CART_PRODUCT_IS_NOT(6002,"商品库存不足"),
    CART_PRODUCT_COUNT_ERROR(6003,"商品数量异常"),
    CART_PRODUCT_ID_ERROR(6004,"删除的商品id异常"),
    CART_IS_NULL(6005,"购物车为空"),

    EDIT_PWD_IS_NULL(5000,"修改密码信息为空"),
    EDIT_PWD_MISMATCH(5001,"密码不一致"),
    EDIT_PWD_OLDPWD_ERROR(5002,"原密码有误"),
    UUID_MISMATCH(5003,"UUID不匹配"),

    TOKEN_IS_NULL(4000,"token为空"),
    TOKEN_FORMAT_ERROR(4001,"token格式错误"),
    TOKEN_SIGN_ERROR(4002,"签名错误"),
    TOKEN_EXPIRED(4003,"token已过期"),
    TOKEN_NEED_LOGIN(4004,"请先登录"),
    TOKEN_DECODING_ERROR(4005,"token解码失败"),

    MEMBER_LOGIN_IS_NULL(3000,"登录信息为空"),
    MEMBER_LOGIN_MEMBERNAME_ERROR(3001,"会员名有误"),
    MEMBER_LOGIN_PWD_ERROR(3002,"密码有误"),

    MEMBER_INFO_IS_NULL(2000,"注册信息为空"),
    MEMBER_PWD_MISMATCH(2001,"密码不一致"),
    MEMBER_PHONE_ERROR(2002,"手机格式有误"),
    MEMBER_MAIL_ERROR(2003,"邮箱格式有误"),
    MEMBER_CODE_MISMATCH(2004,"验证码有误"),
    MEMBER_NAME_EXIST(2005,"用户名已存在"),
    MEMBER_MAIL_EXIST(2006,"邮箱已存在"),
    MEMBER_PHONE_EXIST(2007,"手机已存在"),

    PHONE_IS_NULL(1000,"手机为空");
    private int code;
    private String msg;

    private ResponseEnum(int code,String msg){
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
